package com.inter.service.impl;

import com.inter.entity.common.DevicePartnerAccess;
import com.inter.mapper.DevicePartnerAccessMapper;
import com.inter.service.DevicePartnerAccessService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional
@Service
public class DevicePartnerAccessServiceImpl implements DevicePartnerAccessService {
    @Resource
    DevicePartnerAccessMapper devicePartnerAccessMapper;
    @Override
    public void putInPartnerAccessInfo(DevicePartnerAccess access) {
        devicePartnerAccessMapper.putInPartnerAccessInfo(access);
    }

    @Override
    public List<DevicePartnerAccess> getPartnerAccessList(String partnerCode, String deviceId, String deviceType) {
        return devicePartnerAccessMapper.getPartnerAccessList(partnerCode,deviceId,deviceType);
    }



    @Override
    public int findAccessInfoByCodeAndId(String token, String partnerCode, String deviceId, String deviceType,String requestOrderId) {
        return devicePartnerAccessMapper.findAccessInfoByCodeAndId(token,partnerCode,deviceId,deviceType,requestOrderId);
    }
}
